<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.SQLException" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page language="java" import="java.lang.*" %>
<%@ page import = "java.sql.SQLException" %>
<%@ page import = "com.seniorproject.aims.*" %>
<%@ page import = "java.util.List" %>
<%@page import="java.util.ArrayList"%>
<%@ page import = "java.util.Properties" %>
<%@ page import = "javax.servlet.ServletContext" %>
<%@ page import = "java.io.File" %>
<%@ page import = "java.io.InputStream" %>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Date"%>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Student Summary</title>
	<link rel="stylesheet" type="text/css" href="css/stylev2.css" />
	<link rel="stylesheet" type="text/css" href="css/student_system.css" />
	
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
	<script src="js/FileSaver.js"></script>
	<script src="js/jquery-student-summary-wordexport.js"></script>
	
	<script type="text/javascript" src="js/jspdf.js"></script>
	<script type="text/javascript" src="js/jspdf/jspdf.plugin.standard_fonts_metrics.js"></script> 
	<script type="text/javascript" src="js/jspdf/jspdf.plugin.split_text_to_size.js"></script>               
	<script type="text/javascript" src="js/jspdf/jspdf.plugin.from_html.js"></script>
	<script type="text/javascript" src="js/jspdf/jspdf.plugin.addimage.js"></script>
	<script type="text/javascript" src="js/jspdf/jspdf.debug.js"></script>
	
	<style type="text/css">
		 a:hover {
		  cursor:pointer;
		 }
		 a {
	      text-decoration:none;
	   	}
	</style>
	
	<script type="text/javascript">

		 jQuery(document).ready(function($) {
			 
			 $("#word_export").click(function(event) {
		
					 try{
					 	$("#export-content").wordExport();
			
					 }catch(x){
						 //alert(x);
					 }
			
		
				 });
		 });
	</script>

</head>
<body>

<%
	String strUser = String.valueOf(session.getAttribute("sUser"));
	HttpSession htp_session = request.getSession();
	
	if (htp_session == null || htp_session.getAttribute("sUser") == null) {
	    // Forward the control to login.jsp if authentication fails or session expires
	    request.getRequestDispatcher("/login.jsp").forward(request,
	        response);
	}
	
	if("admin".equals(htp_session.getAttribute("sUser"))){%>
	<script>alert("This user dont have PERMISSION to access this zone.");</script>
	<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=admin_home.jsp" > 	
	<%}
	
//////////get permission ///////////
	String name = String.valueOf(session.getAttribute("name"));
	String surname = String.valueOf(session.getAttribute("surname"));
	String role_name = String.valueOf(session.getAttribute("student_role"));

	String department_id2 = String.valueOf(session.getAttribute("department_id"));
	
	System.out.println("name : " + name);///////////////////////////////
	System.out.println("department_id : " + department_id2);/////////////////////////
	
	
	List<String> system_name = new ArrayList<String>();
	
	Permission permission = new Permission(strUser,name);
	permission.setDepartmentId(department_id2);
	permission.setStudentCreate(Boolean.valueOf(String.valueOf(session.getAttribute("student_create"))));
	permission.setStudentDelete(Boolean.valueOf(String.valueOf(session.getAttribute("student_delete"))));
	permission.setStudentRead(Boolean.valueOf(String.valueOf(session.getAttribute("student_read"))));
	permission.setStudentUpdate(Boolean.valueOf(String.valueOf(session.getAttribute("student_update"))));

	
	String permiss = "";
	if(permission.getStudentCreate()) {
		permiss = permiss + "Add";
	}
	if(permission.getStudentUpdate()) {
		if("".equals(permiss)) {
			permiss = permiss + "Edit";
		} else {
			permiss = permiss + " Edit";
		}
	}
	if(permission.getStudentRead()) {
		if("".equals(permiss)) {
			permiss = permiss + "Read";
		} else {
			permiss = permiss + " Read";
		}
	}
	if(permission.getStudentDelete()) {
		if("".equals(permiss)) {
			permiss = permiss + "Delete";
		} else {
			permiss = permiss + " Delete";
		}
	}
	//check permission
	if(!permission.getStudentRead()){%>
		<script>alert("This user dont have PERMISSION to access this zone.");</script>
		<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=student_home.jsp"> 	
	<%}
	
	/* start date follow year */
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy",java.util.Locale.US);
	
	int year = Integer.parseInt(sdf.format(Calendar.getInstance().getTime()));
	int month = Calendar.getInstance().get(Calendar.MONTH)+1;
	
	System.out.println("year : "+year);///////////try////////////
	System.out.println("month : "+month);///////////try////////////
	
	// year 1
	int start_date_1 = -1; // initial
	if(month<6){
		
		start_date_1 = year-1;
	}else{
		start_date_1 = year;
		
	}
	
	// year 2
	int start_date_2 = -1; // initial
	if(month<6){
		
		start_date_2 = year-2;
	}else{
		start_date_2 = year-1;
		
	}
	
	// year 3
	int start_date_3 = -1; // initial
	if(month<6){
		
		start_date_3 = year-3;
	}else{
		start_date_3 = year-2;
		
	}
	
	// year 4	
	int start_date_4 = -1; // initial
	if(month<6){
		
		start_date_4 = year-4;
	}else{
		start_date_4 = year-3;
		
	}	
	
	// over year 4
	int start_date_5 = -1;
	if(month<6){
		
		start_date_5 = year-4;
	}else{
		start_date_5 = year-3;
		
	}	
	
	System.out.println("START DATE 1: "+start_date_1);//////////////////try////////////////
	System.out.println("START DATE 2: "+start_date_2);//////////////////try////////////////
	System.out.println("START DATE 3: "+start_date_3);//////////////////try////////////////
	System.out.println("START DATE 4: "+start_date_4);//////////////////try////////////////
	System.out.println("START DATE 5: "+start_date_5);//////////////////try////////////////


%>



<div id="page-wrap">
		<div id="inside">
			<table border="0">
				<tr style="font-size:24px">
					<td width="600" height="100" style= "background-color: #273b80;border: 0px ;padding: 0px; 0px;" >
						<div id="header_banner-2"></div>
					</td>
					
					<td width="680" height="100" style= "background-color: #273b80;border: 0px;padding: 0px; 0px;" >
						<p align="right"><label><font size="4" color="#ffffff">username : <%=strUser%>&nbsp;&nbsp;</font></label></p>
						<a href="logout.jsp"><p align="right"><label style="cursor: pointer;"><font size="3" color="#ffffff">log out &nbsp;</font></label></p></a>
					</td>
				</tr>
			</table>
			<table border="0">
				<tr style="font-size:10px">
					<td width = "720" height="50" style= "background-color:#D0D0D0 ;">
						<center><a href="student_home.jsp"><h2><font color="#273b80"><label style="cursor: pointer;">หน้าแรก</label></font></h2></a></center>
					</td>
	<%
			if(permission.getStudentRead()) {
	%>
					<td width = "720" height="50" style= "background-color:#D0D0D0 ;">
						<center><a href="student_search.jsp"><h2><font color="#273b80"><label style="cursor: pointer;">ค้นหา</label></font></h2></a></center>
					</td>

					<td width = "720" height="50" style= "background-color:#FFFFFF ; border-bottom-color: #FFFFFF;">
						<center><a href=""><h2><font color="#273b80"><label>สรุปจำนวนนักศึกษา</label></font></h2></a></center>

					</td>
	<%
			}
			if(permission.getStudentCreate()) {
	%>
					<td width = "720" height="50" style= "background-color:#D0D0D0 ;">
						<center><a href="student_add.jsp"><h2><font color="#273b80"><label style="cursor: pointer;">เพิ่มนักศึกษา</label></font></h2></center>
					</td>
	<%
			}
			
			if(permission.getStudentUpdate()) {
	%>
					<td width = "720" height="50" style= "background-color:#D0D0D0 ;">
						<center><a href="student_edit.jsp"><h2><font color="#273b80"><label style="cursor: pointer;">แก้ไขข้อมูล</label></font></h2></a></center>
					</td>
	<%
			}
	%>
				</tr>
			</table>
				
				<div id="main-content-ac">
						
		<!-- 			<h2 style="padding-left: 2.5cm; color: #273b80; font-size: 24px;">ตารางสรุปยอด</h2>	 -->
					
					<div style="padding-left: 980px;">
						<table border ="0" style="border: 0; border-collapse:collapse;">
							<tr style="border: 0; border-collapse:collapse;">
								<td  id="word_export" class="silvergrad" style="border: 0; border-collapse:collapse; cursor: pointer;">
									<span title="Export as Microsoft Word">
										<img id="word_export_icon" src="image/doc_export_icon.png" style="width:45px; height:38px;">
									</span>
									</td>
								<td style="border: 0; border-collapse:collapse; width:20px "></td>
							</tr>					
						</table>
					 </div>
					
					</br></br>
					
					<div id="export-content">
						<table border="1" width = "1200px">
						<tbody>
								  <tr style="font-size:16px">
									<td><center><strong>สาขาวิชา</strong></center></td>
									<td><center><strong>ชั้นปี</strong></center></td>
									<td><center><strong>นักศึกษา</strong></center></td>
									<td><center><strong>สำเร็จการศึกษา</strong></center></td>
									<td><center><strong>ลาออก(ยอดสะสม)</strong></center></td>
									<td><center><strong>พ้นสภาพนักศึกษา/สละสิทธิ์(ยอดสะสม)</strong></center></td>
									<td><center><strong>ย้ายสาขา</strong></center></td>
									<td><center><strong>เข้าสาขา</strong></center></td>
									<td><center><strong>คงเหลือ</strong></center></td>
									<td><center><strong>ชาย</strong></center></td>
									<td><center><strong>หญิง</strong></center></td>
									<td><center><strong>วท.</strong></center></td>
									<td><center><strong>วท. 1</strong></center></td>
									<td><center><strong>วท. 2</strong></center></td>
									<td><center><strong>วท. 3</strong></center></td>
									<td><center><strong>ระบบกลาง</strong></center></td>
									<td><center><strong>รับตรง</strong></center></td>
									<td><center><strong>โครงการพิเศษ</strong></center></td>
									<td><center><strong>โควตาของม.</strong></center></td>
								  </tr>
							  
						</tbody>
							
											<% // ME 1 %>
				<%
					SummaryStudent stu = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(5, start_date_1, false));
								stu.setGraduate(QueryStudent.countStudentStatus(5, start_date_1, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(5, start_date_1, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(5, start_date_1, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(5, start_date_1, false));
								stu.setIn(QueryStudent.countStudentTransferIn(5, start_date_1, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(5, start_date_1, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(5, start_date_1, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(5, start_date_1, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(5, start_date_1, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(5, start_date_1, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(5, start_date_1, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(5, start_date_1, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(5, start_date_1, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(5, start_date_1, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(5, start_date_1, 4, false));
				%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>ME</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%	// ME 2	%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(5, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(5, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(5, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(5, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(5, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(5, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(5, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(5, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(5, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(5, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(5, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(5, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(5, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(5, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(5, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(5, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%			// ME 3	  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(5, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(5, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(5, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(5, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(5, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(5, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
					
								stu.setMale(QueryStudent.countStudentGender(5, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(5, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(5, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(5, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(5, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(5, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(5, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(5, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(5, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(5, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%			// ME 4				%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(5, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(5, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(5, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(5, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(5, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(5, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(5, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(5, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(5, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(5, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(5, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(5, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(5, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(5, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(5, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(5, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%	  			// ME High		  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(5, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(5, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(5, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(5, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(5, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(5, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(5, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(5, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(5, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(5, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(5, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(5, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(5, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(5, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(5, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(5, start_date_5, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  					<%			// IE 1			%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(7, start_date_1, false));
								stu.setGraduate(QueryStudent.countStudentStatus(7, start_date_1, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(7, start_date_1, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(7, start_date_1, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(7, start_date_1, false));
								stu.setIn(QueryStudent.countStudentTransferIn(7, start_date_1, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(7, start_date_1, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(7, start_date_1, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(7, start_date_1, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(7, start_date_1, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(7, start_date_1, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(7, start_date_1, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(7, start_date_1, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(7, start_date_1, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(7, start_date_1, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(7, start_date_1, 4, false));
				%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>CE</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%				// IE 2		  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(7, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(7, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(7, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(7, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(7, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(7, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(7, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(7, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(7, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(7, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(7, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(7, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(7, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(7, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(7, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(7, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%	  			// IE 3		  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(7, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(7, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(7, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(7, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(7, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(7, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(7, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(7, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(7, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(7, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(7, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(7, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(7, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(7, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(7, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(7, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%					// IE 4				%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(7, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(7, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(7, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(7, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(7, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(7, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(7, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(7, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(7, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(7, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(7, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(7, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(7, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(7, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(7, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(7, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%			  			// IE High				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(7, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(7, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(7, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(7, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(7, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(7, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(7, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(7, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(7, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(7, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(7, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(7, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(7, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(7, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(7, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(7, start_date_5, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  					<%			// EE 1				%>
			<%
				//	SummaryStudent co4 = new SummaryStudent();
							stu.setAll(QueryStudent.countStudentDepartment(3, start_date_1, false));
							stu.setGraduate(QueryStudent.countStudentStatus(3, start_date_1, 3, false));
							stu.setResign(QueryStudent.countStudentStatus(3, start_date_1, 2, false));
							stu.setRetire(QueryStudent.countStudentStatus(3, start_date_1, 8, false));
							stu.setTransfer(QueryStudent.countStudentTransferOut(3, start_date_1, false));
							stu.setIn(QueryStudent.countStudentTransferIn(3, start_date_1, false));
							
							stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
							
							stu.setMale(QueryStudent.countStudentGender(3, start_date_1, "M", false));
							stu.setFemale(QueryStudent.countStudentGender(3, start_date_1, "F", false));
							stu.setVt(QueryStudent.countStudentStatus(3, start_date_1, 4, false));
							stu.setVt1(QueryStudent.countStudentStatus(3, start_date_1, 5, false));
							stu.setVt2(QueryStudent.countStudentStatus(3, start_date_1, 6, false));
							stu.setVt3(QueryStudent.countStudentStatus(3, start_date_1, 7, false));
							stu.setAdmission(QueryStudent.countStudentEntrance(3, start_date_1, 2, false));
							stu.setDirect(QueryStudent.countStudentEntrance(3, start_date_1, 1, false));
							stu.setSpecial(QueryStudent.countStudentEntrance(3, start_date_1, 3, false));
							stu.setQuota(QueryStudent.countStudentEntrance(3, start_date_1, 4, false));
			%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>EE</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%	 			// EE 2			  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
							stu.setAll(QueryStudent.countStudentDepartment(3, start_date_2, false));
							stu.setGraduate(QueryStudent.countStudentStatus(3, start_date_2, 3, false));
							stu.setResign(QueryStudent.countStudentStatus(3, start_date_2, 2, false));
							stu.setRetire(QueryStudent.countStudentStatus(3, start_date_2, 8, false));
							stu.setTransfer(QueryStudent.countStudentTransferOut(3, start_date_2, false));
							stu.setIn(QueryStudent.countStudentTransferIn(3, start_date_2, false));
							
							stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
							
							stu.setMale(QueryStudent.countStudentGender(3, start_date_2, "M", false));
							stu.setFemale(QueryStudent.countStudentGender(3, start_date_2, "F", false));
							stu.setVt(QueryStudent.countStudentStatus(3, start_date_2, 4, false));
							stu.setVt1(QueryStudent.countStudentStatus(3, start_date_2, 5, false));
							stu.setVt2(QueryStudent.countStudentStatus(3, start_date_2, 6, false));
							stu.setVt3(QueryStudent.countStudentStatus(3, start_date_2, 7, false));
							stu.setAdmission(QueryStudent.countStudentEntrance(3, start_date_2, 2, false));
							stu.setDirect(QueryStudent.countStudentEntrance(3, start_date_2, 1, false));
							stu.setSpecial(QueryStudent.countStudentEntrance(3, start_date_2, 3, false));
							stu.setQuota(QueryStudent.countStudentEntrance(3, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%				  		// EE 3				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
						int all = QueryStudent.countStudentDepartment(3, start_date_3, false);
						int graduate = QueryStudent.countStudentStatus(3, start_date_3, 3, false);
						int resign = QueryStudent.countStudentStatus(3, start_date_3, 2, false);
						int retire =  QueryStudent.countStudentStatus(3, start_date_3, 8, false);
						int transfer = QueryStudent.countStudentTransferOut(3, start_date_3, false);
						int in = QueryStudent.countStudentTransferIn(3, start_date_3, false);
						
						int now = all - (graduate+resign+retire+transfer+in);
						
						int male = QueryStudent.countStudentGender(3, start_date_3, "M", false);
						int female = QueryStudent.countStudentGender(3, start_date_3, "F", false);
						int vt = QueryStudent.countStudentStatus(3, start_date_3, 4, false);
						int vt1 = QueryStudent.countStudentStatus(3, start_date_3, 5, false);
						int vt2 = QueryStudent.countStudentStatus(3, start_date_3, 6, false);
						int vt3 = QueryStudent.countStudentStatus(3, start_date_3, 7, false);
						int admission = QueryStudent.countStudentEntrance(3, start_date_3, 2, false);
						int direct = QueryStudent.countStudentEntrance(3, start_date_3, 1, false);
						int special = QueryStudent.countStudentEntrance(3, start_date_3, 3, false);
						int quota = QueryStudent.countStudentEntrance(3, start_date_3, 4, false);
						
						// EC 3
						int all_ec3 = QueryStudent.countStudentECDepartment(3, start_date_3, false, "ไฟฟ้าสื่อสาร");
						int graduate_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 3, false, "ไฟฟ้าสื่อสาร");
						int resign_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 2, false, "ไฟฟ้าสื่อสาร");
						int retire_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 8, false, "ไฟฟ้าสื่อสาร");
						int transfer_ec3 = QueryStudent.countStudentECTransferOut(3, start_date_3, false, "ไฟฟ้าสื่อสาร");
						int in_ec3 = QueryStudent.countStudentECTransferIn(3, start_date_3, false, "ไฟฟ้าสื่อสาร");
						
						int now_ec3 = all_ec3 - (graduate_ec3+resign_ec3+retire_ec3+transfer_ec3+in_ec3);
						
						int male_ec3 = QueryStudent.countStudentECGender(3, start_date_3, "M", false, "ไฟฟ้าสื่อสาร");
						int female_ec3 = QueryStudent.countStudentECGender(3, start_date_3, "F", false, "ไฟฟ้าสื่อสาร");
						int vt_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 4, false, "ไฟฟ้าสื่อสาร");
						int vt1_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 5, false, "ไฟฟ้าสื่อสาร");
						int vt2_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 6, false, "ไฟฟ้าสื่อสาร");
						int vt3_ec3 = QueryStudent.countStudentECStatus(3, start_date_3, 7, false, "ไฟฟ้าสื่อสาร");
						int admission_ec3 = QueryStudent.countStudentECEntrance(3, start_date_3, 2, false, "ไฟฟ้าสื่อสาร");
						int direct_ec3 = QueryStudent.countStudentECEntrance(3, start_date_3, 1, false, "ไฟฟ้าสื่อสาร");
						int special_ec3 = QueryStudent.countStudentECEntrance(3, start_date_3, 3, false, "ไฟฟ้าสื่อสาร");
						int quota_ec3 = QueryStudent.countStudentECEntrance(3, start_date_3, 4, false, "ไฟฟ้าสื่อสาร"); 
						
						
						// result EE3
						stu.setAll(all - all_ec3);
						stu.setGraduate(graduate - graduate_ec3);
						stu.setResign(resign - resign_ec3);
						stu.setRetire(retire - retire_ec3);
						stu.setTransfer(transfer - transfer_ec3);
						stu.setIn(in - in_ec3);
						
						stu.setNow(now - now_ec3);
						
						stu.setMale(male - male_ec3);
						stu.setFemale(female - female_ec3);
						stu.setVt(vt - vt_ec3);
						stu.setVt1(vt1 - vt1_ec3);
						stu.setVt2(vt2 - vt2_ec3);
						stu.setVt3(vt3 - vt3_ec3);
						stu.setAdmission(admission - admission_ec3);
						stu.setDirect(direct - direct_ec3);
						stu.setSpecial(special - special_ec3);
						stu.setQuota(quota - quota_ec3);
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%		// EE 4			%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
					 all = QueryStudent.countStudentDepartment(3, start_date_4, false);
					 graduate = QueryStudent.countStudentStatus(3, start_date_4, 3, false);
					 resign = QueryStudent.countStudentStatus(3, start_date_4, 2, false);
					 retire =  QueryStudent.countStudentStatus(3, start_date_4, 8, false);
					 transfer = QueryStudent.countStudentTransferOut(3, start_date_4, false);
					 in = QueryStudent.countStudentTransferIn(3, start_date_4, false);
					
					 now = all - (graduate+resign+retire+transfer+in);
					
					 male = QueryStudent.countStudentGender(3, start_date_4, "M", false);
					 female = QueryStudent.countStudentGender(3, start_date_4, "F", false);
					 vt = QueryStudent.countStudentStatus(3, start_date_4, 4, false);
					 vt1 = QueryStudent.countStudentStatus(3, start_date_4, 5, false);
					 vt2 = QueryStudent.countStudentStatus(3, start_date_4, 6, false);
					 vt3 = QueryStudent.countStudentStatus(3, start_date_4, 7, false);
					 admission = QueryStudent.countStudentEntrance(3, start_date_4, 2, false);
					 direct = QueryStudent.countStudentEntrance(3, start_date_4, 1, false);
					 special = QueryStudent.countStudentEntrance(3, start_date_4, 3, false);
					 quota = QueryStudent.countStudentEntrance(3, start_date_4, 4, false);
					 
					// EC 4
					int all_ec4 = QueryStudent.countStudentECDepartment(3, start_date_4, false, "ไฟฟ้าสื่อสาร");
					int graduate_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 3, false, "ไฟฟ้าสื่อสาร");
					int resign_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 2, false, "ไฟฟ้าสื่อสาร");
					int retire_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 8, false, "ไฟฟ้าสื่อสาร");
					int transfer_ec4 = QueryStudent.countStudentECTransferOut(3, start_date_4, false, "ไฟฟ้าสื่อสาร");
					int in_ec4 = QueryStudent.countStudentECTransferIn(3, start_date_4, false, "ไฟฟ้าสื่อสาร");
					
					int now_ec4 = all_ec4 - (graduate_ec4+resign_ec4+retire_ec4+transfer_ec4+in_ec4);
					
					int male_ec4 = QueryStudent.countStudentECGender(3, start_date_4, "M", false, "ไฟฟ้าสื่อสาร");
					int female_ec4 = QueryStudent.countStudentECGender(3, start_date_4, "F", false, "ไฟฟ้าสื่อสาร");
					int vt_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 4, false, "ไฟฟ้าสื่อสาร");
					int vt1_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 5, false, "ไฟฟ้าสื่อสาร");
					int vt2_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 6, false, "ไฟฟ้าสื่อสาร");
					int vt3_ec4 = QueryStudent.countStudentECStatus(3, start_date_4, 7, false, "ไฟฟ้าสื่อสาร");
					int admission_ec4 = QueryStudent.countStudentECEntrance(3, start_date_4, 2, false, "ไฟฟ้าสื่อสาร");
					int direct_ec4 = QueryStudent.countStudentECEntrance(3, start_date_4, 1, false, "ไฟฟ้าสื่อสาร");
					int special_ec4 = QueryStudent.countStudentECEntrance(3, start_date_4, 3, false, "ไฟฟ้าสื่อสาร");
					int quota_ec4 = QueryStudent.countStudentECEntrance(3, start_date_4, 4, false, "ไฟฟ้าสื่อสาร");
					

					// result EE4
					stu.setAll(all - all_ec4);
					stu.setGraduate(graduate - graduate_ec4);
					stu.setResign(resign - resign_ec4);
					stu.setRetire(retire - retire_ec4);
					stu.setTransfer(transfer - transfer_ec4);
					stu.setIn(in - in_ec4);
					
					stu.setNow(now - now_ec4);
					
					stu.setMale(male - male_ec4);
					stu.setFemale(female - female_ec4);
					stu.setVt(vt - vt_ec4);
					stu.setVt1(vt1 - vt1_ec4);
					stu.setVt2(vt2 - vt2_ec4);
					stu.setVt3(vt3 - vt3_ec4);
					stu.setAdmission(admission - admission_ec4);
					stu.setDirect(direct - direct_ec4);
					stu.setSpecial(special - special_ec4);
					stu.setQuota(quota - quota_ec4);
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%					  	// EE High			
					//	SummaryStudent co4 = new SummaryStudent();
					 all = QueryStudent.countStudentDepartment(3, start_date_5, false);
					 graduate = QueryStudent.countStudentStatus(3, start_date_5, 3, false);
					 resign = QueryStudent.countStudentStatus(3, start_date_5, 2, false);
					 retire =  QueryStudent.countStudentStatus(3, start_date_5, 8, false);
					 transfer = QueryStudent.countStudentTransferOut(3, start_date_5, false);
					 in = QueryStudent.countStudentTransferIn(3, start_date_5, false);
					
					 now = all - (graduate+resign+retire+transfer+in);
					
					 male = QueryStudent.countStudentGender(3, start_date_5, "M", false);
					 female = QueryStudent.countStudentGender(3, start_date_5, "F", false);
					 vt = QueryStudent.countStudentStatus(3, start_date_5, 4, false);
					 vt1 = QueryStudent.countStudentStatus(3, start_date_5, 5, false);
					 vt2 = QueryStudent.countStudentStatus(3, start_date_5, 6, false);
					 vt3 = QueryStudent.countStudentStatus(3, start_date_5, 7, false);
					 admission = QueryStudent.countStudentEntrance(3, start_date_5, 2, false);
					 direct = QueryStudent.countStudentEntrance(3, start_date_5, 1, false);
					 special = QueryStudent.countStudentEntrance(3, start_date_5, 3, false);
					 
					// EC High
					int all_ec5 = QueryStudent.countStudentECDepartment(3, start_date_5, false, "ไฟฟ้าสื่อสาร");
					int graduate_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 3, false, "ไฟฟ้าสื่อสาร");
					int resign_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 2, false, "ไฟฟ้าสื่อสาร");
					int retire_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 8, false, "ไฟฟ้าสื่อสาร");
					int transfer_ec5 = QueryStudent.countStudentECTransferOut(3, start_date_5, false, "ไฟฟ้าสื่อสาร");
					int in_ec5 = QueryStudent.countStudentECTransferIn(3, start_date_5, false, "ไฟฟ้าสื่อสาร");
					
					int now_ec5 = all_ec4 - (graduate_ec5+resign_ec5+retire_ec5+transfer_ec5+in_ec5);
					
					int male_ec5 = QueryStudent.countStudentECGender(3, start_date_5, "M", false, "ไฟฟ้าสื่อสาร");
					int female_ec5 = QueryStudent.countStudentECGender(3, start_date_5, "F", false, "ไฟฟ้าสื่อสาร");
					int vt_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 4, false, "ไฟฟ้าสื่อสาร");
					int vt1_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 5, false, "ไฟฟ้าสื่อสาร");
					int vt2_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 6, false, "ไฟฟ้าสื่อสาร");
					int vt3_ec5 = QueryStudent.countStudentECStatus(3, start_date_5, 7, false, "ไฟฟ้าสื่อสาร");
					int admission_ec5 = QueryStudent.countStudentECEntrance(3, start_date_5, 2, false, "ไฟฟ้าสื่อสาร");
					int direct_ec5 = QueryStudent.countStudentECEntrance(3, start_date_5, 1, false, "ไฟฟ้าสื่อสาร");
					int special_ec5 = QueryStudent.countStudentECEntrance(3, start_date_5, 3, false, "ไฟฟ้าสื่อสาร");
					int quota_ec5 = QueryStudent.countStudentECEntrance(3, start_date_5, 4, false, "ไฟฟ้าสื่อสาร");

					// result EE high
					stu.setAll(all - all_ec5);
					stu.setGraduate(graduate - graduate_ec5);
					stu.setResign(resign - resign_ec5);
					stu.setRetire(retire - retire_ec5);
					stu.setTransfer(transfer - transfer_ec5);
					stu.setIn(in - in_ec5);
					
					stu.setNow(now - now_ec5);
					
					stu.setMale(male - male_ec5);
					stu.setFemale(female - female_ec5);
					stu.setVt(vt - vt_ec5);
					stu.setVt1(vt1 - vt1_ec5);
					stu.setVt2(vt2 - vt2_ec5);
					stu.setVt3(vt3 - vt3_ec5);
					stu.setAdmission(admission - admission_ec5);
					stu.setDirect(direct - direct_ec5);
					stu.setSpecial(special - special_ec5);
					stu.setQuota(quota - quota_ec5);
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
					
							  	
							  		<%			  			// EC 3
							  							  							  												  								  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
						stu.setAll(QueryStudent.countStudentECDepartment(3, start_date_3, false, "ไฟฟ้าสื่อสาร"));
						stu.setGraduate(QueryStudent.countStudentECStatus(3, start_date_3, 3, false, "ไฟฟ้าสื่อสาร"));
						stu.setResign(QueryStudent.countStudentECStatus(3, start_date_3, 2, false, "ไฟฟ้าสื่อสาร"));
						stu.setRetire(QueryStudent.countStudentECStatus(3, start_date_3, 8, false, "ไฟฟ้าสื่อสาร"));
						stu.setTransfer(QueryStudent.countStudentECTransferOut(3, start_date_3, false, "ไฟฟ้าสื่อสาร"));
						stu.setIn(QueryStudent.countStudentECTransferIn(3, start_date_3, false, "ไฟฟ้าสื่อสาร"));
						
						stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
						
						stu.setMale(QueryStudent.countStudentECGender(3, start_date_3, "M", false, "ไฟฟ้าสื่อสาร"));
						stu.setFemale(QueryStudent.countStudentECGender(3, start_date_3, "F", false, "ไฟฟ้าสื่อสาร"));
						stu.setVt(QueryStudent.countStudentECStatus(3, start_date_3, 4, false, "ไฟฟ้าสื่อสาร"));
						stu.setVt(QueryStudent.countStudentECStatus(3, start_date_3, 5, false, "ไฟฟ้าสื่อสาร"));
						stu.setVt(QueryStudent.countStudentECStatus(3, start_date_3, 6, false, "ไฟฟ้าสื่อสาร"));
						stu.setVt(QueryStudent.countStudentECStatus(3, start_date_3, 7, false, "ไฟฟ้าสื่อสาร"));
						stu.setAdmission(QueryStudent.countStudentECEntrance(3, start_date_3, 2, false, "ไฟฟ้าสื่อสาร"));
						stu.setDirect(QueryStudent.countStudentECEntrance(3, start_date_3, 1, false, "ไฟฟ้าสื่อสาร"));
						stu.setSpecial(QueryStudent.countStudentECEntrance(3, start_date_3, 3, false, "ไฟฟ้าสื่อสาร"));
						stu.setQuota(QueryStudent.countStudentECEntrance(3, start_date_3, 4, false, "ไฟฟ้าสื่อสาร"));
				%>
							    <tr style="font-size:16px">
						
							  	<td rowspan="3"><center><strong>EC</strong></center></td>
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=all_ec3%> </strong></center></td>
							  	<td><center><strong> <%=graduate_ec3%> </strong></center></td>
							  	<td><center><strong> <%=resign_ec3%> </strong></center></td>
							  	<td><center><strong> <%=retire_ec3%> </strong></center></td>
							  	<td><center><strong> <%=transfer_ec3%> </strong></center></td>
							  	<td><center><strong> <%=in_ec3%> </strong></center></td>
							  	<td><center><strong> <%=now_ec3%> </strong></center></td>
							  	<td><center><strong> <%=male_ec3%> </strong></center></td>
							  	<td><center><strong> <%=female_ec3%> </strong></center></td>
							  	<td><center><strong> <%=vt_ec3%> </strong></center></td>
							  	<td><center><strong> <%=vt1_ec3%> </strong></center></td>
							  	<td><center><strong> <%=vt2_ec3%> </strong></center></td>
							  	<td><center><strong> <%=vt3_ec3%> </strong></center></td>
							  	<td><center><strong> <%=admission_ec3%> </strong></center></td>
							  	<td><center><strong> <%=direct_ec3%> </strong></center></td>
							  	<td><center><strong> <%=special_ec3%> </strong></center></td>
							  	<td><center><strong> <%=quota_ec3%> </strong></center></td>
							  </tr>
							  
							  
							  
							  
							  		<%						  			// EC 4
							  							  							  							  							  		%>
					<%
						//SummaryStudent co4 = new SummaryStudent();
							stu.setAll(QueryStudent.countStudentECDepartment(3, start_date_4, false, "ไฟฟ้าสื่อสาร"));
							stu.setGraduate(QueryStudent.countStudentECStatus(3, start_date_4, 3, false, "ไฟฟ้าสื่อสาร"));
							stu.setResign(QueryStudent.countStudentECStatus(3, start_date_4, 2, false, "ไฟฟ้าสื่อสาร"));
							stu.setRetire(QueryStudent.countStudentECStatus(3, start_date_4, 8, false, "ไฟฟ้าสื่อสาร"));
							stu.setTransfer(QueryStudent.countStudentECTransferOut(3, start_date_4, false, "ไฟฟ้าสื่อสาร"));
							stu.setIn(QueryStudent.countStudentECTransferIn(3, start_date_4, false, "ไฟฟ้าสื่อสาร"));
							
							stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
							
							stu.setMale(QueryStudent.countStudentECGender(3, start_date_4, "M", false, "ไฟฟ้าสื่อสาร"));
							stu.setFemale(QueryStudent.countStudentECGender(3, start_date_4, "F", false, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_4, 4, false, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_4, 5, false, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_4, 6, false, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_4, 7, false, "ไฟฟ้าสื่อสาร"));
							stu.setAdmission(QueryStudent.countStudentECEntrance(3, start_date_4, 2, false, "ไฟฟ้าสื่อสาร"));
							stu.setDirect(QueryStudent.countStudentECEntrance(3, start_date_4, 1, false, "ไฟฟ้าสื่อสาร"));
							stu.setSpecial(QueryStudent.countStudentECEntrance(3, start_date_4, 3, false, "ไฟฟ้าสื่อสาร"));
							stu.setQuota(QueryStudent.countStudentECEntrance(3, start_date_4, 4, false, "ไฟฟ้าสื่อสาร"));
					%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=all_ec4%> </strong></center></td>
							  	<td><center><strong> <%=graduate_ec4%> </strong></center></td>
							  	<td><center><strong> <%=resign_ec4%> </strong></center></td>
							  	<td><center><strong> <%=retire_ec4%> </strong></center></td>
							  	<td><center><strong> <%=transfer_ec4%> </strong></center></td>
							  	<td><center><strong> <%=in_ec4%> </strong></center></td>
							  	<td><center><strong> <%=now_ec4%> </strong></center></td>
							  	<td><center><strong> <%=male_ec4%> </strong></center></td>
							  	<td><center><strong> <%=female_ec4%> </strong></center></td>
							  	<td><center><strong> <%=vt_ec4%> </strong></center></td>
							  	<td><center><strong> <%=vt1_ec4%> </strong></center></td>
							  	<td><center><strong> <%=vt2_ec4%> </strong></center></td>
							  	<td><center><strong> <%=vt3_ec4%> </strong></center></td>
							  	<td><center><strong> <%=admission_ec4%> </strong></center></td>
							  	<td><center><strong> <%=direct_ec4%> </strong></center></td>
							  	<td><center><strong> <%=special_ec4%> </strong></center></td>
							  	<td><center><strong> <%=quota_ec4%> </strong></center></td>
							  </tr>
							  
							  
							  
							  
							  		<%			  			// EC High
							  							  							  							  							  		%>
					<%
						//	SummaryStudent co4 = new SummaryStudent();
							stu.setAll(QueryStudent.countStudentECDepartment(3, start_date_5, true, "ไฟฟ้าสื่อสาร"));
							stu.setGraduate(QueryStudent.countStudentECStatus(3, start_date_5, 3, true, "ไฟฟ้าสื่อสาร"));
							stu.setResign(QueryStudent.countStudentECStatus(3, start_date_5, 2, true, "ไฟฟ้าสื่อสาร"));
							stu.setRetire(QueryStudent.countStudentECStatus(3, start_date_5, 8, true, "ไฟฟ้าสื่อสาร"));
							stu.setTransfer(QueryStudent.countStudentECTransferOut(3, start_date_5, true, "ไฟฟ้าสื่อสาร"));
							stu.setIn(QueryStudent.countStudentECTransferIn(3, start_date_5, true, "ไฟฟ้าสื่อสาร"));
							
							stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
							
							stu.setMale(QueryStudent.countStudentECGender(3, start_date_5, "M", true, "ไฟฟ้าสื่อสาร"));
							stu.setFemale(QueryStudent.countStudentECGender(3, start_date_5, "F", true, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_5, 4, true, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_5, 5, true, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_5, 6, true, "ไฟฟ้าสื่อสาร"));
							stu.setVt(QueryStudent.countStudentECStatus(3, start_date_5, 7, true, "ไฟฟ้าสื่อสาร"));
							stu.setAdmission(QueryStudent.countStudentECEntrance(3, start_date_5, 2, true, "ไฟฟ้าสื่อสาร"));
							stu.setDirect(QueryStudent.countStudentECEntrance(3, start_date_5, 1, true, "ไฟฟ้าสื่อสาร"));
							stu.setSpecial(QueryStudent.countStudentECEntrance(3, start_date_5, 3, true, "ไฟฟ้าสื่อสาร"));
							stu.setQuota(QueryStudent.countStudentECEntrance(3, start_date_5, 4, true, "ไฟฟ้าสื่อสาร"));
					%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=all_ec5%> </strong></center></td>
							  	<td><center><strong> <%=graduate_ec5%> </strong></center></td>
							  	<td><center><strong> <%=resign_ec5%> </strong></center></td>
							  	<td><center><strong> <%=retire_ec5%> </strong></center></td>
							  	<td><center><strong> <%=transfer_ec5%> </strong></center></td>
							  	<td><center><strong> <%=in_ec5%> </strong></center></td>
							  	<td><center><strong> <%=now_ec5%> </strong></center></td>
							  	<td><center><strong> <%=male_ec5%> </strong></center></td>
							  	<td><center><strong> <%=female_ec5%> </strong></center></td>
							  	<td><center><strong> <%=vt_ec5%> </strong></center></td>
							  	<td><center><strong> <%=vt1_ec5%> </strong></center></td>
							  	<td><center><strong> <%=vt2_ec5%> </strong></center></td>
							  	<td><center><strong> <%=vt3_ec5%> </strong></center></td>
							  	<td><center><strong> <%=admission_ec5%> </strong></center></td>
							  	<td><center><strong> <%=direct_ec5%> </strong></center></td>
							  	<td><center><strong> <%=special_ec5%> </strong></center></td>
							  	<td><center><strong> <%=quota_ec5%> </strong></center></td>
							  </tr>
							  
							  
							  
							  
							    	<%			    		// CHE 1			    	%>
					<%
						//	SummaryStudent co4 = new SummaryStudent();
									stu.setAll(QueryStudent.countStudentDepartment(6, start_date_1, false));
									stu.setGraduate(QueryStudent.countStudentStatus(6, start_date_1, 3, false));
									stu.setResign(QueryStudent.countStudentStatus(6, start_date_1, 2, false));
									stu.setRetire(QueryStudent.countStudentStatus(6, start_date_1, 8, false));
									stu.setTransfer(QueryStudent.countStudentTransferOut(6, start_date_1, false));
									stu.setIn(QueryStudent.countStudentTransferIn(6, start_date_1, false));
									
									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
									
									stu.setMale(QueryStudent.countStudentGender(6, start_date_1, "M", false));
									stu.setFemale(QueryStudent.countStudentGender(6, start_date_1, "F", false));
									stu.setVt(QueryStudent.countStudentStatus(6, start_date_1, 4, false));
									stu.setVt1(QueryStudent.countStudentStatus(6, start_date_1, 5, false));
									stu.setVt2(QueryStudent.countStudentStatus(6, start_date_1, 6, false));
									stu.setVt3(QueryStudent.countStudentStatus(6, start_date_1, 7, false));
									stu.setAdmission(QueryStudent.countStudentEntrance(6, start_date_1, 2, false));
									stu.setDirect(QueryStudent.countStudentEntrance(6, start_date_1, 1, false));
									stu.setSpecial(QueryStudent.countStudentEntrance(6, start_date_1, 3, false));
									stu.setQuota(QueryStudent.countStudentEntrance(6, start_date_1, 4, false));
					%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>CHE</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%			  			// CHE 2				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(6, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(6, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(6, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(6, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(6, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(6, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(6, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(6, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(6, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(6, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(6, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(6, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(6, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(6, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(6, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(6, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%				  			// CHE 3					  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(6, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(6, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(6, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(6, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(6, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(6, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(6, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(6, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(6, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(6, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(6, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(6, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(6, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(6, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(6, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(6, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%					// CHE 4						%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(6, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(6, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(6, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(6, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(6, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(6, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(6, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(6, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(6, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(6, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(6, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(6, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(6, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(6, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(6, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(6, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%						 	// CHE High			  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(6, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(6, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(6, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(6, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(6, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(6, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(6, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(6, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(6, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(6, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(6, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(6, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(6, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(6, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(6, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(6, start_date_5, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							    		<%			    		// CE 1			    		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(4, start_date_1, false));
								stu.setGraduate(QueryStudent.countStudentStatus(4, start_date_1, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(4, start_date_1, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(4, start_date_1, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(4, start_date_1, false));
								stu.setIn(QueryStudent.countStudentTransferIn(4, start_date_1, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(4, start_date_1, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(4, start_date_1, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(4, start_date_1, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(4, start_date_1, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(4, start_date_1, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(4, start_date_1, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(4, start_date_1, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(4, start_date_1, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(4, start_date_1, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(4, start_date_1, 4, false));
				%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>CE</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%					  	// CE 2				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(4, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(4, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(4, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(4, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(4, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(4, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(4, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(4, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(4, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(4, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(4, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(4, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(4, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(4, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(4, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(4, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%		  			// CE 3						  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(4, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(4, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(4, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(4, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(4, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(4, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(4, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(4, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(4, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(4, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(4, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(4, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(4, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(4, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(4, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(4, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%							// CE 4 									%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(4, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(4, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(4, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(4, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(4, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(4, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(4, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(4, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(4, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(4, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(4, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(4, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(4, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(4, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(4, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(4, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%					  	// CE High				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(4, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(4, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(4, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(4, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(4, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(4, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(4, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(4, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(4, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(4, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(4, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(4, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(4, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(4, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(4, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(4, start_date_5, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							    	<%				    	// CO 1				    	%>
					<%
						//	SummaryStudent co4 = new SummaryStudent();
									stu.setAll(QueryStudent.countStudentDepartment(1, start_date_1, false));
									stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_1, 3, false));
									stu.setResign(QueryStudent.countStudentStatus(1, start_date_1, 2, false));
									stu.setRetire(QueryStudent.countStudentStatus(1, start_date_1, 8, false));
									stu.setTransfer(QueryStudent.countStudentTransferOut(1, start_date_1, false));
									stu.setIn(QueryStudent.countStudentTransferIn(1, start_date_1, false));
									
									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
									
									stu.setMale(QueryStudent.countStudentGender(1, start_date_1, "M", false));
									stu.setFemale(QueryStudent.countStudentGender(1, start_date_1, "F", false));
									stu.setVt(QueryStudent.countStudentStatus(1, start_date_1, 4, false));
									stu.setVt1(QueryStudent.countStudentStatus(1, start_date_1, 5, false));
									stu.setVt2(QueryStudent.countStudentStatus(1, start_date_1, 6, false));
									stu.setVt3(QueryStudent.countStudentStatus(1, start_date_1, 7, false));
									stu.setAdmission(QueryStudent.countStudentEntrance(1, start_date_1, 2, false));
									stu.setDirect(QueryStudent.countStudentEntrance(1, start_date_1, 1, false));
									stu.setSpecial(QueryStudent.countStudentEntrance(1, start_date_1, 3, false));
									stu.setQuota(QueryStudent.countStudentEntrance(1, start_date_1, 4, false));
					%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>CO</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%			  			// CO 2				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(1, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(1, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(1, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(1, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(1, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(1, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(1, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(1, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(1, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(1, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(1, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(1, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(1, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(1, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(1, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(1, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%			  			// CO 3			  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(1, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(1, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(1, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(1, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(1, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(1, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(1, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(1, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(1, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(1, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(1, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(1, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(1, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(1, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(1, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(1, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%						// CO 4						%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(1, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(1, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(1, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(1, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(1, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(1, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(1, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(1, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(1, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(1, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(1, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(1, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(1, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(1, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(1, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(1, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%			  			// CO High				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(1, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(1, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(1, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(1, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(1, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(1, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(1, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(1, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(1, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(1, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(1, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(1, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(1, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(1, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(1, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(1, start_date_5, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  			<%		  				// BE 1			  			%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(2, start_date_1, false));
								stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_1, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(2, start_date_1, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(2, start_date_1, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(2, start_date_1, false));
								stu.setIn(QueryStudent.countStudentTransferIn(2, start_date_1, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(2, start_date_1, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(2, start_date_1, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(2, start_date_1, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(2, start_date_1, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(2, start_date_1, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(2, start_date_1, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(2, start_date_1, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(2, start_date_1, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(2, start_date_1, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(2, start_date_1, 4, false));
				%>
							<tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>BE</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%				  			// BE 2				  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(2, start_date_2, false));
								stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_2, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(2, start_date_2, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(2, start_date_2, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(2, start_date_2, false));
								stu.setIn(QueryStudent.countStudentTransferIn(2, start_date_2, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(2, start_date_2, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(2, start_date_2, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(2, start_date_2, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(2, start_date_2, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(2, start_date_2, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(2, start_date_2, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(2, start_date_2, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(2, start_date_2, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(2, start_date_2, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(2, start_date_2, 4, false));
				%>
							<tr style="font-size:16px">
					
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  	
							  		<%		  			// BE 3			  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(2, start_date_3, false));
								stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_3, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(2, start_date_3, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(2, start_date_3, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(2, start_date_3, false));
								stu.setIn(QueryStudent.countStudentTransferIn(2, start_date_3, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(2, start_date_3, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(2, start_date_3, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(2, start_date_3, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(2, start_date_3, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(2, start_date_3, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(2, start_date_3, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(2, start_date_3, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(2, start_date_3, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(2, start_date_3, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(2, start_date_3, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
									<%					// BE 4					%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(2, start_date_4, false));
								stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_4, 3, false));
								stu.setResign(QueryStudent.countStudentStatus(2, start_date_4, 2, false));
								stu.setRetire(QueryStudent.countStudentStatus(2, start_date_4, 8, false));
								stu.setTransfer(QueryStudent.countStudentTransferOut(2, start_date_4, false));
								stu.setIn(QueryStudent.countStudentTransferIn(2, start_date_4, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(2, start_date_4, "M", false));
								stu.setFemale(QueryStudent.countStudentGender(2, start_date_4, "F", false));
								stu.setVt(QueryStudent.countStudentStatus(2, start_date_4, 4, false));
								stu.setVt1(QueryStudent.countStudentStatus(2, start_date_4, 5, false));
								stu.setVt2(QueryStudent.countStudentStatus(2, start_date_4, 6, false));
								stu.setVt3(QueryStudent.countStudentStatus(2, start_date_4, 7, false));
								stu.setAdmission(QueryStudent.countStudentEntrance(2, start_date_4, 2, false));
								stu.setDirect(QueryStudent.countStudentEntrance(2, start_date_4, 1, false));
								stu.setSpecial(QueryStudent.countStudentEntrance(2, start_date_4, 3, false));
								stu.setQuota(QueryStudent.countStudentEntrance(2, start_date_4, 4, false));
				%>
							    <tr style="font-size:16px">
					
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  		<%					  	// BE High			  		%>
				<%
					//	SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countStudentDepartment(2, start_date_5, true));
								stu.setGraduate(QueryStudent.countStudentStatus(2, start_date_5, 3, true));
								stu.setResign(QueryStudent.countStudentStatus(2, start_date_5, 2, true));
								stu.setRetire(QueryStudent.countStudentStatus(2, start_date_5, 8, true));
								stu.setTransfer(QueryStudent.countStudentTransferOut(2, start_date_5, true));
								stu.setIn(QueryStudent.countStudentTransferIn(2, start_date_5, true));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()+stu.getTransfer()+stu.getIn()));
								
								stu.setMale(QueryStudent.countStudentGender(2, start_date_5, "M", true));
								stu.setFemale(QueryStudent.countStudentGender(2, start_date_5, "F", true));
								stu.setVt(QueryStudent.countStudentStatus(2, start_date_5, 4, true));
								stu.setVt1(QueryStudent.countStudentStatus(2, start_date_5, 5, true));
								stu.setVt2(QueryStudent.countStudentStatus(2, start_date_5, 6, true));
								stu.setVt3(QueryStudent.countStudentStatus(2, start_date_5, 7, true));
								stu.setAdmission(QueryStudent.countStudentEntrance(2, start_date_5, 2, true));
								stu.setDirect(QueryStudent.countStudentEntrance(2, start_date_5, 1, true));
								stu.setSpecial(QueryStudent.countStudentEntrance(2, start_date_5, 3, true));
								stu.setQuota(QueryStudent.countStudentEntrance(2, start_date_5, 4, false));
				%>
				
				
				
							    <tr style="font-size:16px">
					
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  
									<%				// SUM 1					%>
				<%
					//SummaryStudent co4 = new SummaryStudent();
								stu.setAll(QueryStudent.countAllDepartment(start_date_1, false));
								stu.setGraduate(QueryStudent.countAllStatus(start_date_1, 3, false));
								stu.setResign(QueryStudent.countAllStatus(start_date_1, 2, false));
								stu.setRetire(QueryStudent.countAllStatus(start_date_1, 8, false));
								stu.setTransfer(QueryStudent.countAllTransferIn(start_date_1, false));
								stu.setIn(QueryStudent.countAllTransferOut(start_date_1, false));
								
								stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()));
								
								stu.setMale(QueryStudent.countAllGender(start_date_1, "M", false));
								stu.setFemale(QueryStudent.countAllGender(start_date_1, "F", false));
								stu.setVt(QueryStudent.countAllStatus(start_date_1, 4, false));
								stu.setVt1(QueryStudent.countAllStatus(start_date_1, 5, false));
								stu.setVt2(QueryStudent.countAllStatus(start_date_1, 6, false));
								stu.setVt3(QueryStudent.countAllStatus(start_date_1, 7, false));
								stu.setAdmission(QueryStudent.countAllEntrance(start_date_1, 2, false));
								stu.setDirect(QueryStudent.countAllEntrance(start_date_1, 1, false));
								stu.setSpecial(QueryStudent.countAllEntrance(start_date_1, 3, false));
								stu.setQuota(QueryStudent.countAllEntrance(start_date_1, 4, false));
				%>
							  <tr style="font-size:16px">
							  	<td rowspan="5"><center><strong>SUM</strong></center></td>
							  	<td><center><strong>1</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  <%			  			// SUM 2						  		%>
							  
					<%
  						//SummaryStudent co4 = new SummaryStudent();
  									stu.setAll(QueryStudent.countAllDepartment(start_date_2, false));
  									stu.setGraduate(QueryStudent.countAllStatus(start_date_2, 3, false));
  									stu.setResign(QueryStudent.countAllStatus(start_date_2, 2, false));
  									stu.setRetire(QueryStudent.countAllStatus(start_date_2, 8, false));
  									stu.setTransfer(QueryStudent.countAllTransferIn(start_date_2, false));
									stu.setIn(QueryStudent.countAllTransferOut(start_date_2, false));
  									
  									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()));
  									
  									stu.setMale(QueryStudent.countAllGender(start_date_2, "M", false));
  									stu.setFemale(QueryStudent.countAllGender(start_date_2, "F", false));
  									stu.setVt(QueryStudent.countAllStatus(start_date_2, 4, false));
  									stu.setVt1(QueryStudent.countAllStatus(start_date_2, 5, false));
  									stu.setVt2(QueryStudent.countAllStatus(start_date_2, 6, false));
  									stu.setVt3(QueryStudent.countAllStatus(start_date_2, 7, false));
  									stu.setAdmission(QueryStudent.countAllEntrance(start_date_2, 2, false));
  									stu.setDirect(QueryStudent.countAllEntrance(start_date_2, 1, false));
  									stu.setSpecial(QueryStudent.countAllEntrance(start_date_2, 3, false));
  									stu.setQuota(QueryStudent.countAllEntrance(start_date_2, 4, false));
  					%>
							  <tr style="font-size:16px">
							  	<td><center><strong>2</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  
							  	
							  		<%			  			// SUM 3						  		%>
					<%
						//SummaryStudent co4 = new SummaryStudent();
									stu.setAll(QueryStudent.countAllDepartment(start_date_3, false));
									stu.setGraduate(QueryStudent.countAllStatus(start_date_3, 3, false));
									stu.setResign(QueryStudent.countAllStatus(start_date_3, 2, false));
									stu.setRetire(QueryStudent.countAllStatus(start_date_3, 8, false));
									stu.setTransfer(QueryStudent.countAllTransferIn(start_date_3, false));
									stu.setIn(QueryStudent.countAllTransferOut(start_date_3, false));
									
									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()));
									
									stu.setMale(QueryStudent.countAllGender(start_date_3, "M", false));
									stu.setFemale(QueryStudent.countAllGender(start_date_3, "F", false));
									stu.setVt(QueryStudent.countAllStatus(start_date_3, 4, false));
									stu.setVt1(QueryStudent.countAllStatus(start_date_3, 5, false));
									stu.setVt2(QueryStudent.countAllStatus(start_date_3, 6, false));
									stu.setVt3(QueryStudent.countAllStatus(start_date_3, 7, false));
									stu.setAdmission(QueryStudent.countAllEntrance(start_date_3, 2, false));
									stu.setDirect(QueryStudent.countAllEntrance(start_date_3, 1, false));
									stu.setSpecial(QueryStudent.countAllEntrance(start_date_3, 3, false));
									stu.setQuota(QueryStudent.countAllEntrance(start_date_3, 4, false));
					%>
							  <tr style="font-size:16px">
							  	<td><center><strong>3</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  		<%			  			// SUM 4		  		%>
					<%
						//SummaryStudent co4 = new SummaryStudent();
									stu.setAll(QueryStudent.countAllDepartment(start_date_4, false));
									stu.setGraduate(QueryStudent.countAllStatus(start_date_4, 3, false));
									stu.setResign(QueryStudent.countAllStatus(start_date_4, 2, false));
									stu.setRetire(QueryStudent.countAllStatus(start_date_4, 8, false));
									stu.setTransfer(QueryStudent.countAllTransferIn(start_date_4, false));
									stu.setIn(QueryStudent.countAllTransferOut(start_date_4, false));
									
									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()));
									
									stu.setMale(QueryStudent.countAllGender(start_date_4, "M", false));
									stu.setFemale(QueryStudent.countAllGender(start_date_4, "F", false));
									stu.setVt(QueryStudent.countAllStatus(start_date_4, 4, false));
									stu.setVt1(QueryStudent.countAllStatus(start_date_4, 5, false));
									stu.setVt2(QueryStudent.countAllStatus(start_date_4, 6, false));
									stu.setVt3(QueryStudent.countAllStatus(start_date_4, 7, false));
									stu.setAdmission(QueryStudent.countAllEntrance(start_date_4, 2, false));
									stu.setDirect(QueryStudent.countAllEntrance(start_date_4, 1, false));
									stu.setSpecial(QueryStudent.countAllEntrance(start_date_4, 3, false));
									stu.setQuota(QueryStudent.countAllEntrance(start_date_4, 4, false));
					%>
							  <tr style="font-size:16px">
							  	<td><center><strong>4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
							  		<%		  			// SUM High		  		%>
					<%
						//SummaryStudent co4 = new SummaryStudent();
									stu.setAll(QueryStudent.countAllDepartment(start_date_5, true));
									stu.setGraduate(QueryStudent.countAllStatus(start_date_5, 3, true));
									stu.setResign(QueryStudent.countAllStatus(start_date_5, 2, true));
									stu.setRetire(QueryStudent.countAllStatus(start_date_5, 8, true));
									stu.setTransfer(QueryStudent.countAllTransferIn(start_date_5, false));
									stu.setIn(QueryStudent.countAllTransferOut(start_date_5, false));
									
									stu.setNow(stu.getAll() - (stu.getGraduate()+stu.getResign()+stu.getRetire()));
									
									stu.setMale(QueryStudent.countAllGender(start_date_5, "M", true));
									stu.setFemale(QueryStudent.countAllGender(start_date_5, "F", true));
									stu.setVt(QueryStudent.countAllStatus(start_date_5, 4, true));
									stu.setVt1(QueryStudent.countAllStatus(start_date_5, 5, true));
									stu.setVt2(QueryStudent.countAllStatus(start_date_5, 6, true));
									stu.setVt3(QueryStudent.countAllStatus(start_date_5, 7, true));
									stu.setAdmission(QueryStudent.countAllEntrance(start_date_5, 2, true));
									stu.setDirect(QueryStudent.countAllEntrance(start_date_5, 1, true));
									stu.setSpecial(QueryStudent.countAllEntrance(start_date_5, 3, true));
									stu.setQuota(QueryStudent.countAllEntrance(start_date_5, 4, false));
					%>
							  <tr style="font-size:16px">
							  	<td><center><strong>สูงกว่าปี4</strong></center></td>
							  	<td><center><strong> <%=stu.getAll() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getGraduate() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getResign() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getRetire() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getTransfer()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getIn()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getNow()%> </strong></center></td>
							  	<td><center><strong> <%=stu.getMale() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getFemale() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt1() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt2() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getVt3() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getAdmission() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getDirect() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getSpecial() %> </strong></center></td>
							  	<td><center><strong> <%=stu.getQuota() %> </strong></center></td>
							  </tr>
							  
							  
						</table>
						
						
					<br><br><br><br><br><br><br><br>
					
				</div>	
				
			<div style="clear: both;"></div>
				
			<div id="footer"></div>
			
		</div>		
			<div style="clear: both;"></div>		
   </div> 


</body>
</html>